BIASDATE
The BIASDATE
field specifier (case sensitive) allows you to boost the score of result documents by a specified percentage, based on how close the date in a specified field is to a specified date.
NOTE: You can optimize the speed of this field specifier by restricting the field to the
Format
FieldText=BIASDATE{optimumDate,range,percentage}:yourFields
optimumDate
|
The date that the specified field must contain to increase or decrease the weight by the maximum percentage. |
range
|
A positive value that defines the range, in seconds, of the specified optimumDate . If yourFields contain a value in the range (optimum - range ) to (optimum + range ), the weight is increased or decreased according to the specified percentage . |
percentage
|
A percentage in the range 100 to -100. If the value of When |
yourFields
|
Type one or more fields. A document has its score boosted if it contains one of these fields, and if this field contains a date that falls within the specified range of the optimum date. Separate multiple fields with colons (: ). There must be no space before or after a colon. |
You can use the following formats to specify your dates:
Format | Explanation |
---|---|
D+/M+/#YY+
|
A date. For example, If the year is a number less than 40, it is read as a year in the 2000s. If the year is a number between 40 and 99, it is read as a year in the 1900s. For example, IDOL Server treats the date as a date in its local timezone. |
YYYY-MM-DD
|
A date in ISO-8601 format. For example, 2017-05-12 |
HH:NN:SS D+/M+/#YY+
|
A time and date. For example, If the year is a number less than 40, it is read as a year in the 2000s. If the year is a number between 40 and 99, it is read as a year in the 1900s. For example, IDOL Server treats the date as a date in its local timezone. |
YYYY-MM-DDTHH:NN:SSZ
YYYY-MM-DDTHH:NN:SS±HHMM
|
A date and time in ISO-8601 formats, with a time zone (either as a literal Z, or a four digit time zone offset). For example, |
HH:NN:SS D+/M+/#YY+ #ADBC
|
A time and date with a time period. For example, For the time period, you can use IDOL Server treats the date as a date in its local timezone. |
N
|
A positive or negative number of days from the current date. For example, |
Ns
|
A positive or negative number of seconds from now. For example, |
Ne
|
Epoch seconds (seconds since 1 January 1970 UTC). For example, |
NOTE: IDOL Server treats any date that does not have explicit timezone information as a date in the local timezone, both in the index and in your query parameters. This behavior might result in non-intuitive matches.
For example, epoch second values are always UTC. The value 1012345000e
matches times as 22:56:40 on 29 January 2002 UTC. If your local timezone is GMT-6, this query might match an indexed date value of 03:56:40 on 29 January 2002 (which corresponds to the same time UTC), because the indexed date is in your local timezone.
Similarly, if your query date is 03:56:40 29/01/2002
, this might match an indexed epoch seconds date of 1012345000
.
Example
FieldText=BIASDATE{01/12/2008,864000,10}:DATE
A document whose DATE
field value is within a range of 10
days (864000
seconds) either side of 1/12/2008
has its weight increased on a linear scale from 10%
if the date is 1/12/2008
, to 0%
if the date is 20/11/2008
or 11/12/2008
.
FieldText=BIASDATE{01/12/2008,86400,-10}:DATE
A document whose DATE
field value is within a range of 10
days (864000
seconds) either side of 1/12/2008
has its weight decreased on a linear scale from -10%
if the date is 1/12/2008
, to 0%
if the date is 20/11/2008
or 11/12/2008
.
See Also
-
NumericDateType configuration parameter
-
AbsWeight action parameter